function HandleTableProducts(gui, item, options) {
  this._gui = gui;
  this._item = item;
  this._options = options;
  
  this._createElements();
}
HandleTableProducts.prototype._createElements = function() {
  var tr, td, _self = this;
  DOMUtils.removeTableRows(this._gui.productsTable, 1);

  if (this._item.length == 0) {
    tr = this._gui.productsTable.insertRow(-1);
    td = tr.insertCell(-1);
    td.colSpan = 6;
    td.style.height = '25px';
    td.style.backgroundColor = '#fff';
    td.style.textAlign = 'center';
    td.style.borderRight = 'solid 1px #694247';
    td.style.borderBottom = 'solid 1px #694247';
    td.appendChild(document.createTextNode('N/A'));
  }
  
  var exist = false;
  for (var i = 0, il = this._item.length; i < il; i++) {
    var p = this._item[i];
    if ((p.pi_model == Constant.MODEL_NAME_USER_VIDEOGRAPHER && p.state == 7) || (p.pi_model == Constant.MODEL_NAME_PRODUCT_COMMON && p.state == 16) || (p.pi_model == Constant.MODEL_NAME_PRODUCT_RETOUCH_MAGAZINE && p.state == 16) || (p.pi_model == Constant.MODEL_NAME_PRODUCT_4X6 && p.state == 10) || (p.pi_model == Constant.MODEL_NAME_PRODUCT_VIDEODVD && p.state == 5)) {
      exist = true;
    }
  }
  this._gui.checkAll.style.display = (exist) ? 'inline' : 'none';
  
  this._gui.checkAll.onclick = function() { if (this.checked) {
                                              for (var i = 0, il = _self._item.length; i < il; i++) {
                                                var p = _self._item[i];
                                                p._received = true;
                                              }
                                            } else {
                                              for (var i = 0, il = _self._item.length; i < il; i++) {
                                                var p = _self._item[i];
                                                p._received = false;
                                              }
                                            }
                                            _self._createElements();
                                          };
  
  
  for (var j = 0, jl = this._item.length; j < jl; j++) {
    var product = this._item[j];
    
    tr = this._gui.productsTable.insertRow(-1);
    new TableRowProduct(tr, product, this._options);
  }
};